<div class="container main-content">

    <div class="span-3" >
        <% if @member.photo? %>
        <%= image_tag @member.photo.url, :class => "avatar profile" %>
        <% else %>
        <%= image_tag('avatars/default.png', :class => "avatar profile")%>
        <% end %>
    </div>
    <div class="span-21 last">
        <h2>
        <% if @member.has :name and @member.has :surname%>
        <%= @member.name %>
        <%= @member.surname %>
        <% else %>
        <%= @member.email %>
        <% end %>

        <% if @member.has :nickname %>
        [<%= @member.nickname%>]
        <% end %>
        </h2>
        
        <% if current_member %>
	        <div class="admin_links">
	        	<%= link_to "Pošalji privatnu poruku", send_pm_path(@member.id) %>
	        	<% if admin? %>
	        	<%= link_to "Uredi", edit_member_path(@member)%>
	        	<%= link_to "Izbriši korisnika", @member, :confirm => 'Are you sure?', :method => :delete %>
	
	        	<% end %>
	        </div>
        <% end %>

    </div>
    
    <div  class="span-24 last" style="height:20px;"></div>
    <div class="span-8">
        <b>Tip članstva: </b> <%= @member.membership.name %>
        <br>
        
        <b>Ovlasti: </b> <%= @member.permission.name %>
        <br>
        
        <b>E-mail: </b> <%= @member.email %>
        
        <% if @member.has :address or @member.has :city%>
        <br>
        <b>Moja trenutna lokacija je</b>
        <br>
        <% if @member.has :address %><%= @member.address %><% end %>
        <% if @member.has :address and @member.has :city%>,<% end %>
        <% if @member.has :city %><%= @member.city %><% end %>
        <% end %>
        <% if @member.has :occupation %>
        
        <br>
        <b>Trenutno se bavim sa:</b>
        <%= @member.occupation %>
        <% end %>
    </div>
    <div class="span-8">
        <b>Učanjen(a) sam u sljedeće grupe: </b>
        <br>
        <% @member.groups.each do |group| %>
        <%= link_to group.name, group%> <br>
        <% end %>
    </div>
    <div class="span-8 last">
        <% if @member.has :about %>
        <b>O meni:</b>
        <br>
        <%= @member.about %>
        <% end %>
    </div>
</div>
</div>
